<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      > 

    <f:subview id="menuBarGeral">
        <h:form id="formBarMenu">
            <p:menubar autoSubmenuDisplay="true" id="menuBarPrincipal" style="border: none;" styleClass="bvb-font">
                <p:menuitem value="#{msg.menuBarPrincipal}" ajax="false" action="principal.xhtml" icon="globo"/>
                <p:submenu label="#{msg.menuBarLogin}" icon="keyLogin" rendered="#{usuario_logado == null}">
                    <p:menuitem value="#{msg.menuBarLogar}" ajax="false" action="#{fluxoExibicaoLogin.exibirLogin()}" icon="pessoalSenhaLogo" />
                    <p:menuitem value="#{msg.menuRegistro}" ajax="false" action="#{fluxoExibicaoLogin.exibirCadastro()}" icon="cadLogin" />
                    <p:menuitem value="#{msg.menuResetPass}" ajax="false" action="#{fluxoExibicaoLogin.exibirReset()}" icon="resetLogin" />
                </p:submenu>
                <p:menuitem value="#{msg.menuBarCadastrar}" ajax="false" action="cadastro.xhtml" icon="editMenuBar" rendered="#{usuario_logado != null and loginManager.usuario.maxRole.papel.level >= 50 }"/>
                <p:menuitem value="#{msg.menuBarAdm}" ajax="false" action="administracao.xhtml" icon="admMenu" rendered="#{usuario_logado != null and loginManager.usuario.maxRole.papel.level >= 100 }"/>
                <p:menuitem value="#{msg.menuBarProva}" ajax="false" action="prova.xhtml" icon="provaLogo" rendered="#{usuario_logado != null}" />
                <p:menuitem value="#{msg.menuBarContestacao}" ajax="false" action="contestacao.xhtml" icon="ui-icon ui-icon-alert" rendered="#{false}"/>
                <p:menuitem value="#{msg.menuBarPessoal}" ajax="false" action="pessoal.xhtml" icon="pessoalDadosPessoaisLogo" rendered="#{usuario_logado != null}"/>
                <p:menuitem value="#{msg.menuBarSair}" ajax="true" onclick="confirmation.show()" icon="exitMenu" rendered="#{usuario_logado != null}"/>
            </p:menubar>
            <p:confirmDialog message="#{msg.sairConfirmacao}"  
                             showEffect="bounce" hideEffect="explode"  
                             header="#{msg.titleSairDialog}" severity="alert" widgetVar="confirmation">  

                <p:commandButton value="#{msg.sim}" oncomplete="confirmation.hide()"  
                                 action="#{loginManager.deslogar()}" />  
                <p:commandButton value="#{msg.nao}" onclick="confirmation.hide()" type="button" />   

            </p:confirmDialog> 
        </h:form>
    </f:subview>
</html>